[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
##############################################################################
###+------+###################################################################
#+-| LIST |------------------------------------------------------+############
#| +------+ The LIST command displays the results of <Ques-list> |############
#| for each record in the selected or current database |############
#+---------------------------------------------------------------+############
##############################################################################
##############################################################################
#+--| Syntax |-------------------------------------------------+##############
#| [!<Alias>] LIST [<Ques-list>][Scope][WHILE <L-exp>] |##############
#| [FOR <L-exp>][OFF][TO PRINT] |##############
#+-------------------------------------------------------------+##############
##############################################################################
##############################################################################
######+---| Description |----------------------------------------------+######
######| LIST is identical to DISPLAY, execpt LIST will not pause after |######
######| displaying 24 lines to the screen and has a default scope of |######
######| ALL. Display can be interrupted by the escape key. |######
######| see DISPLAY for more detail. |######
######| -------------------------------------------------------------- |######
######| The format of a <Ques-list> is as follows: |######
######| <expression>[:<nwidth expression>[:<decimal expression>]] |######
######| -------------------------------------------------------------- |######
######| The <nwidth expression> is the number of columns to display |######
######| the results of <expression>. <decimal expression> is the |######
######| number of columns to display decimal place values. Any decimal |######
######| value is right justified, making it easy to program a listing |######
######| of double precision values. |######
######| -------------------------------------------------------------- |######
######| Any data type may have the corresponding <nwidth expression> |######
######| field. for example; |######
######| |######
######| LIST d->logicfld:6 |######
######| LIST a->datefld:10,a->charfld:20,a->numfld:3:2 |######
######| |######
######| The output of LIST goes through the same I/O system as the ? |######
######| command. This system can be redirected to an alternate file. |######
######+----------------------------------------------------------------+######
##############################################################################
##############################################################################
#########+--| Example 1 |-------------------------------------------+#########
#########| * List all names that begin with the letter D. |#########
#########| |#########
#########| LIST FOR substr(upper(ltrim(d->name)),1,1) = "D" |#########
#########+----------------------------------------------------------+#########
##############################################################################
##############################################################################
#########+--| Example 2 |-------------------------------------------+#########
#########| * List names and address to the printer |#########
#########| |#########
#########| LIST n->name, n->address TO PRINT |#########
#########+----------------------------------------------------------+#########
##############################################################################
##############################################################################
#########+--| Example 3 |-------------------------------------------+#########
#########| * Create a list of all students who passed |#########
#########| * freshman Chemistry. |#########
#########| |#########
#########| SET ALTERNATE TO class[ i ] |#########
#########| SET ALTERNATE ON |#########
#########| LIST chem->id,chem->name FOR chem->passed |#########
#########| CLOSE ALTERNATE |#########
#########+----------------------------------------------------------+#########
##############################################################################
##############################################################################
#########+--| Example 4 |-------------------------------------------+#########
#########| * Use the formatting capabilities of the LIST |#########
#########| * command to produce reports. |#########
#########| |#########
#########| LIST s->name:14,s->amount:7:2 WHILE s->state = st[r] |#########
#########+----------------------------------------------------------+#########
##############################################################################
See Also:
DISPLAY
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson